home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group97b.txt / 000075_icon-group-sender _Mon Sep 22 16:20:53 1997.msg < prev    next >
Internet Message Format  |  2000-09-20  |  1KB

  1. Return-Path: <icon-group-sender>
  2. Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
  3.     by cheltenham.cs.arizona.edu (8.8.7/8.8.7) with SMTP id QAA23601
  4.     for <icon-group-addresses@cheltenham.CS.Arizona.EDU>; Mon, 22 Sep 1997 16:20:42 -0700 (MST)
  5. Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
  6.     id AA08227; Mon, 22 Sep 1997 16:20:42 -0700
  7. Message-Id: <9709222031.AA06900@hpclpax.cup.hp.com>
  8. Subject: Re: if not find a and/or b, do x
  9. Date: Mon, 22 Sep 97 13:34:02 -0700
  10. X-Sender: cary@hpclpax.cup.hp.com
  11. X-Mailer: Claris Emailer 2.0, March 15, 1997
  12. From: Cary Coutant <cary@hpclpax.cup.hp.com>
  13. To: "Stuart Robinson" <Stuart.Robinson@anu.edu.au>,
  14.         <icon-group@cs.arizona.edu>
  15. Mime-Version: 1.0
  16. Content-Type: text/plain; charset="US-ASCII"
  17. Errors-To: icon-group-errors@cs.arizona.edu
  18. Status: RO
  19.  
  20. >if find( "{T" ) 
  21. >    then if not find( "{A" | "{O" )
  22. >            then write( line )
  23.  
  24. The if-clause
  25.  
  26.     not find("{A" | "{O")
  27.  
  28. succeeds if find("{A" | "{O") fails. The find will succeed if it finds 
  29. *either* string in the line, so you're really testing here for the 
  30. presence of either string rather than both.
  31.  
  32. What you want is this:
  33.  
  34.     not find("{A") | not find("{O")
  35.  
  36. This will succeed (i.e., it has found an invalid line) if either string 
  37. is not found.
  38.  
  39. -cary
  40.